(function () {
    function displayProperties(value) {
        var result = [];

        for (var prop in value) {
            result.push(prop);
        }

        return result.sort();
    }

    console.log(displayProperties(window.document));
}());